This resource address is used to perform various operations on the specified certificate template.
URL Parameters | |
---|---|
format | The format of the returned data. Can be either
html , json , or xml (default). This value overrides
the Accept header if both are present. |
Request Headers | |
---|---|
Accept | The expected MIME type of the response. If the
format parameter is present, it takes precedence over the Accept header. |
Upon success, MarkLogic Server returns status code 201 (Created). A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.
manage-admin
and security
rolehttp://marklogic.com/xdmp/privileges/manage
http://marklogic.com/xdmp/privileges/manage-admin
http://marklogic.com/xdmp/privileges/get-user
http://marklogic.com/xdmp/privileges/xslt-invoke
The available certificate template operations are summarized in the following list. The details on each operation follow.
Generate Template Certificate Authority
The following operation generates template certificate authority.
{ "operation": "generate-template-certificate-authority", "valid-for": 3 }
Generate Temporary Certificate
The following operation generates temporary certificate. Thevalid-for
and
common-name
properties are required. If not specified,
if-necessary
defaults to true
. If if-necessary
is
true
and a temporary certificate already exists for the template, this
operation does nothing.
{ "operation": "generate-temporary-certificate", "valid-for": 3, "common-name": "some name", "dns-name": "example.com", "ip-addr": "localhost", "if-necessary": true }The following operation returns a certificate. The
common-name
property is
required.
{ "operation": "get-certificate", "common-name": "some name", "dns-name": "example.com", "ip-addr": "localhost" }
Get Certificates for a Template
The following operation returns the certificates for a template.
{ "operation": "get-certificates-for-template" }
Get Pending Certificate Request
The following operation returns the pending request for a certificate. Thecommon-name
property is required.
{ "operation": "get-pending-certificate-request", "common-name": "some name", "dns-name": "example.com", "ip-addr": "localhost" }The following operation inserts a host certificate.
{ "operation": "insert-host-certificates", "certificates": [{ "certificate": { "cert": "-----BEGIN CERTIFICATE-----\nMIIDvzCCAqgg ZZZZZZZZZ\n-----END CERTIFICATE-----", "pkey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQ ZZZZZZZZ\n-----END RSA PRIVATE KEY-----" }}] }The following operation determines if a certificate is needed for the template. Returns
true
if a certificate is needed for the template; false
otherwise. The common-name
property is required.
{ "operation": "need-certificate", "common-name": "some name", "dns-name": "example.com", "ip-addr": "localhost" }The following operation generates a certificate request in the form of a CSR. The
common-name
property is required.
{ "operation": "generate-certificate-request", "common-name": "some name", "dns-name": "example.com", "ip-addr": "localhost" }
Get Template Certificate Authority
The following operation gets a template certificate authority.
{ "operation": "get-template-certificate-authority" }